<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="l" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Lite - Bootstrap Skin</title>
    
    
    <!-- Favicon -->
    <link rel="shortcut icon" href="img/favicon.ico" />
    
    <!-- CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet" />
    <link href="css/font-awesome.min.css" rel="stylesheet" />
    <link href="css/style.css" rel="stylesheet" />
    
    <!-- Google Fonts -->
    <link href='http://fonts.useso.com/css?family=Titillium+Web' rel='stylesheet' type='text/css'>
	<script type="text/javascript">
		function modifyMsg(mid) {
			window.location = "AllMessage.do?type=one&&mid="+mid;
		}
		function deleteMsg(mid) {
			if (confirm("确定要删除吗？")) {
				window.location = "AllMessage.do?type=delete&&mid="+mid;
			}
		}
	 </script>
</head>

<body>
<script type="text/javascript">
	var url = document.referrer;
</script>
    <!-- Start: Preloader -->
    <div id="preloader">
        <div id="loader"></div>
    </div>
    <!-- End: Preloader -->

    <!-- Start: Main Content -->
    <div class="main-container">
        
        <!-- Start: Home -->
        <section class="home-section">
            <div class="container" style="margin-top: 80px">
				<div class="row">
					<div class="col-md-12 col-sm-12 col-xs-12">
						<h1 style="color: FFFFFF">图书商城</h1>
					</div>
				</div>
            </div>
        </section>
        <!-- End: Home -->
		
		<!-- Start: Content -->
        <section class="content-section">
            <div class="container" style="margin-top: 80px">
				<div class="row">
					<div class="col-md-12">
						<nav role="navigation" class="navbar navbar-default">	
						
							<div class="navbar-header">
								<button data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" class="navbar-toggle" type="button">
									<span class="sr-only">Toggle navigation</span>
									<span class="icon-bar"></span>
									<span class="icon-bar"></span>
									<span class="icon-bar"></span>
								</button>
								<a href="#" class="navbar-brand"></a>
                                <a href="#" class="navbar-brand"></a>
                                <a href="#" class="navbar-brand"></a>
                                <a href="#" class="navbar-brand"></a>
							</div>							
							<div id="bs-example-navbar-collapse-1" class="collapse navbar-collapse">
								<ul class="nav navbar-nav">
									<li><a href="SelectBook.do?type=all">首页</a></li>
									<li><a href="carGood.jsp">购物车</a></li>
                                    <li><a href="SelectOrderInfo.do?type=orderInfo">订单</a></li>
									<li class="dropdown"  class="active">
										<a data-toggle="dropdown" class="dropdown-toggle" href="SelectMessage.do?type=all">留言空间 <b class="caret"></b></a>
										<ul role="menu" class="dropdown-menu">
											<li><a href="SelectMessage.do?type=all">全部留言</a></li>
											<li><a href="SelectMessage.do?type=my">我的留言</a></li>
											<li><a href="message_add.jsp">写留言</a></li>
										</ul>
									</li>
								</ul>
								<form role="search" class="navbar-form navbar-left" action="SelectBook.do?type=search" method="post">
									<div class="form-group">
										<input type="text" class="form-control" name="keyword">
									</div>
									<button class="btn btn-danger" type="submit">搜一下</button>
								</form>
								<ul class="nav navbar-nav navbar-right">
									<li><a href="login_user.jsp">登录</a></li>
                                    <li><a href="Logout.do">注销</a></li>
									
								</ul>
							</div>
						</nav>
					</div>
				</div>
			
				
				<div class="row">
					<!--  -->
					 <div class="col-lg-12">
					  <div class="panel panel-default">
						 <div class="panel-heading">我的留言 
						 <!-- <button class="btn btn-danger btn-lg" data-toggle="modal" data-target="#myModal" onclick="window.location.href='message_add.jsp'">去留言</button> -->
						 </div>
						 
						 <div class="lt-box">
						 <l:if test="${empty pv.pageList}">
						 	<p class="lead text-muted" style="padding-left: 450px">您还没有留言呢，去留下您的留言</p>
						 </l:if>
						 </div>
						 
						 <l:if test="${! empty pv.pageList}">
							<l:forEach items="${pv.pageList}" var="m">
								<input type="hidden" name="bid" value="${m.mid}">
						 	<div class="panel-body" >
							<div class="alert alert-success" style="font-family: 黑体"">
							   <div> <font color="#8600FF" size="4px" >主题：${m.title} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 日期：${m.mtime} </font><div style="position:absolute;margin-left: 1000px"><a onclick="modifyMsg(${m.mid})" class="btn btn-info" ><i class="fa fa-info-circle"></i></a><a class="btn btn-danger" onclick="deleteMsg(${m.mid})"><i class="fa fa-times"></i></a></div>
							   </div>
							     
							     <br>
							     <div><font size="3px" color="black">详情：${m.content}</font></div>
							      
							    <%-- <button type="button" data-dismiss="alert" aria-hidden="true" class="close" onclick="deleteMsg(${m.mid})">×</button> --%>
							</div>
							
						 </div>
						 </l:forEach>
						 </l:if>
					  </div>
				   </div>
				   
				</div>
					
					
					<!--  -->
				
			
		</div>	
				
				
        </section>
        <!-- End: Content -->
        
        <!-- Start: Footer-->
        <footer class="footer">
            <p>Copyright &copy; 2017.Company name All rights reserved.</p>
        </footer>
        <!-- End: Footer -->
        
    </div>
    <!-- End: Main Content -->
    
    <!-- Javascript Files -->
    <script type="text/javascript" src="js/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript" src="js/jquery.pagination.js"></script>
	<script type="text/javascript" src="js/jquery.knob.min.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
</body>
</html>
